import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux';
import { HashRouter } from 'react-router-dom';
import App from './App';
import { AppName } from './constant/Env';
import { ThemeProvider } from './context/ThemeContext';
import { configStore } from './redux/store';
import './style/index.scss';

document.title = AppName;

const store = configStore();

const root = createRoot(document.getElementById('root') as Element);

root.render(
  <Provider store={store}>
    <ThemeProvider>
      <HashRouter>
        <App />
      </HashRouter>
    </ThemeProvider>
  </Provider>,
);
